package com.daoyin.ssph.service.impl;

import java.util.List;

import com.daoyin.ssph.bean.Caselist;
import com.daoyin.ssph.dao.CaselistDAO;
import com.daoyin.ssph.service.CaselistService;

public class CaselistServiceImpl extends BaseServiceImpl<Caselist> implements
		CaselistService {
	
	private CaselistDAO dao;
	public void setDao(CaselistDAO dao) {
		this.dao = dao;
	}

	public String add(Caselist t) {
		dao.save(t);
		return "success";	
	}
	public Caselist query(Integer id) {
		Caselist active = dao.findById(id);
		return active;		
	}
	public void delete(Integer id) {
		Caselist caselist = dao.findById(id);
		dao.delete(caselist);
	}
	public List<Caselist> query() {
		List<Caselist> list = dao.findAll();
		return list;	
	}

	public String update(Caselist t) {
		dao.merge(t);
		return "success";
	}

}
